package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 系统参数表（支付折扣方式）
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tc_system_param_discount")
public class SystemParamDiscountPO extends DMSBasePO<SystemParamDiscountPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 参数ID
     */
        @TableId(value = "ID", type = IdType.AUTO)
        private Integer id;
    /**
     * 维修站编码
     */
    @TableField("DEALER_CODE")
    private String dealerCode;
    /**
     * 支付类型
     */
    @TableField("PAY_TYPE")
    private Integer payType;
    /**
     * 支付名称
     */
    @TableField("PAY_NAME")
    private String payName;
    /**
     * 折扣方式
     */
    @TableField("DISCOUNT_VALUE")
    private String discountValue;
    /**
     * 状态(10011001有效,10011002无效)
     */
    @TableField("STATUS")
    private Integer status;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public SystemParamDiscountPO() {
        super();
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getPayName() {
        return payName;
    }

    public void setPayName(String payName) {
        this.payName = payName;
    }

    public String getDiscountValue() {
        return discountValue;
    }

    public void setDiscountValue(String discountValue) {
        this.discountValue = discountValue;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SystemParamDiscountPO{" +
        "id=" + id +
        ", dealerCode=" + dealerCode +
        ", payType=" + payType +
        ", payName=" + payName +
        ", discountValue=" + discountValue +
        ", status=" + status +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "id");
    }


}
